<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>06</title>
</head>
<body>
<button onclick="alert('点击了按钮1')">按钮1</button>
<button id="btn">按钮2</button>
<h4>呵呵</h4>
<span>鼠标移入span</span>
<script>
    let spanE = document.querySelector('span');
    spanE.addEventListener('mouseover', function () {
        console.log('鼠标移入span')
    })
    let btnE = document.getElementById('btn');
    btnE.addEventListener('click', function () {
        alert('点击了按钮2')
    })
</script>
</body>
</html>